//
//  XBSudokuView.h
//  BasicModule
//
//  Created by 徐秀滨 on 2018/5/27.
//  Copyright © 2018年 Zoenet (Xiamen) Health Co.,Ltd. All rights reserved.
//


/*
 水平方向排序
 */
#import <UIKit/UIKit.h>"

@interface XBSudokuCellView : UIView

@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;

@end

@protocol XBSudokuViewDelegate <NSObject>

- (void)sudokuCell:(XBSudokuCellView*)cell forIndex:(NSInteger)index;

@optional
- (void)didSelectItemAtIndex:(NSInteger)index;

@end

@interface XBSudokuView : UIView

/**
 cell个数，设置后会更新self的frame
 */
@property (nonatomic, assign) NSInteger cellCount;
@property (nonatomic, weak) id<XBSudokuViewDelegate> delegate;

/**
 设置完自定义属性后，要调用reloadData进行刷新
 */
- (void)reloadData;

#pragma mark - 自定义相关

@property (nonatomic, assign) CGSize cellSize;
@property (nonatomic, assign) NSInteger columnPerRow;//一行几列，默认为1
@property (nonatomic, assign) UIEdgeInsets cellMarginToSuper;//内容Cell与父view的间距，默认（0，0，0，0）
@property (nonatomic, assign) CGFloat cellMarginToCellVertical;//垂直cell之间的间距，默认0

#pragma mark -cell内容相关

@property (nonatomic, strong) UIFont *titleFont;
@property (nonatomic, strong) UIColor *titleColor;

/**
 设置image的frame，只需要设置y,width,height，x会默认居中
 */
@property (nonatomic, assign) CGRect imageFrame;

/**
 设置title的高度，frame=(0,superView.height-?,superView.width,?)
 */
@property (nonatomic, assign) CGFloat titleHeight;

#pragma mark -分页相关
/**
 一页最大有几条数据，超过则自动展示分页控件
 */
@property (nonatomic, assign) NSInteger maxSizePerPage;
/**
 选中的颜色
 */
@property (nonatomic, strong) UIColor *pageCurrentIndicatorColor;
/**
 默认的颜色
 */
@property (nonatomic, strong) UIColor *pageDefaultIndicatorColor;

@end
